package cn.mall.order.service;

import cn.mall.base.query.BaseQuery;
import cn.mall.base.utils.AjaxResult;
import cn.mall.base.utils.PageList;
import cn.mall.order.domain.Copy;
import cn.mall.order.domain.Order;
import cn.mall.base.service.IBaseService;
import cn.mall.order.domain.UserOrderStatusCounts;
import cn.mall.order.dto.*;
import cn.mall.order.query.OrderQuery;
import org.json.JSONException;

import java.io.IOException;
import java.text.ParseException;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author myf
 * @since 2023-12-13
 */
public interface IOrderService extends IBaseService<Order> {

    Order loadByOid(String oid);

    void receivingByIds(List<Long> ids);

    void receivingById(Long id);

    Object addOrder(Order order) throws IOException, JSONException;


    Boolean addorderByunified(UnifiedDto dto);

//    List<Order> loadByShopId(Long shopId);

    AjaxResult refreshByFllow(Long ShopId) throws IOException, JSONException;

    AjaxResult merchantRefund(RefundDto refundDto);

    List<Copy> SelectByIds(List<Long> ids);

    Copy SelectById(Long id);


    Boolean addLotOrder( List<Order> orders) throws JSONException, IOException;


    AjaxResult newOrder(NewOrderDto dto);

    AjaxResult getTotal(Long shopid);

    List<Order> loadRefundOrderByIds(List<Long> ids);

    AjaxResult bulkRefund(List<Order> orderList);

    void completeByOrder(Long id);

    //分页查询数据
    PageList<Order> pageList(OrderQuery query) throws ParseException;

    void deleteBytime(DeleteDto dto);


    AjaxResult refreshByVideo(Long shopId);


    AjaxResult refreshByBase(Long shopId);

    AjaxResult refreshByBaseByc(Long shopId);

    AjaxResult refreshByBaseByg(Long shopId);

    AjaxResult refreshByBaseByp(Long shopId);

    AjaxResult processing(Long ShopId) ;

    List<Order> receivingByshopId(ReceivingDto receivingDto);

    AjaxResult refreshByConmentGoos(Long shopId);

    AjaxResult refreshByBaseByt(Long shopId);

    AjaxResult refreshByBaseBycmc(Long shopId);

    AjaxResult refreshByBaseByTall(Long shopId);

    UserOrderStatusCounts countOderByUser(Long uid);

}
